package ticketmachine.logic.priceStrategies;

import ticketmachine.logic.Station;
import ticketmachine.logic.Ticket;

public class PriceCalculatorNormal implements IPriceCalculatorStrategy {

	@Override
	public float calculatePrice(Ticket t) {
		float basePrice=t.getDescription().getBasePrice();
		int distance=Station.calculateDistance(t.getSource(), t.getDestination());
		return basePrice*distance;
	}

}
